import { BrowserRouter, Route } from 'react-router-dom';
import Header from './common/header';
import Home from './pages/home';
import Detail from './pages/detail/loadable'; // 加载异步组件
import Login from './pages/login';

function App() {
    return (
        <BrowserRouter>
            <Header />
            <Route path="/" exact component={Home}></Route>
            <Route path="/detail/:id" exact component={Detail}></Route>
            <Route path="/login" exact component={Login}></Route>
        </BrowserRouter>
    );
}

export default App;
